import { createRouter, createWebHistory } from 'vue-router'
// import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('../views/MainView.vue'),
      children:[
        {
          path: '/product',
          name: 'product',
          component: () => import('../views/Product/ProductView.vue'),
        },
        {
          path: '/details',
          name: 'details',
          component: () => import('../views/Product/DetailView.vue'),
        },
        {
          path: '/user',
          name: 'user',
          component: () => import('../views/Product/UserView.vue'),
        },
        {
          path: '/role',
          name: 'role',
          component: () => import('../views/Product/RoleView.vue'),
        }
      ]
    },
  ],
})

export default router
